#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() {
	int n,i,a,j;
	scanf("%d",&n);
	for (i = 2; i <= n; i++) {
		a = 1;
		if (n == 1)
			a = 0;
		else {
			for (j = 2; j <= i; j++) {
				if (i % j == 0)
					break;
			}if (j == i) {
					printf("%d\n", i);
			}
			
			
		}

	}
		return 0;
}